Optimal. Leaf size=52 \[ -\frac {\sin ^3(c+d x)}{3 a d}+\frac {\sin (c+d x)}{a d}+\frac {i \cos ^3(c+d x)}{3 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {3092, 3090, 2633, 2565, 30} \[ -\frac {\sin ^3(c+d x)}{3 a d}+\frac {\sin (c+d x)}{a d}+\frac {i \cos ^3(c+d x)}{3 a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2565
Rule 2633
Rule 3090
Rule 3092
Rubi steps
\begin {align*} \int \frac {\cos ^2(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx &=-\frac {i \int \cos ^2(c+d x) (i a \cos (c+d x)+a \sin (c+d x)) \, dx}{a^2}\\ &=-\frac {i \int \left (i a \cos ^3(c+d x)+a \cos ^2(c+d x) \sin (c+d x)\right ) \, dx}{a^2}\\ &=-\frac {i \int \cos ^2(c+d x) \sin (c+d x) \, dx}{a}+\frac {\int \cos ^3(c+d x) \, dx}{a}\\ &=\frac {i \operatorname {Subst}\left (\int x^2 \, dx,x,\cos (c+d x)\right )}{a d}-\frac {\operatorname {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{a d}\\ &=\frac {i \cos ^3(c+d x)}{3 a d}+\frac {\sin (c+d x)}{a d}-\frac {\sin ^3(c+d x)}{3 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 73, normalized size = 1.40 \[ \frac {3 \sin (c+d x)}{4 a d}+\frac {\sin (3 (c+d x))}{12 a d}+\frac {i \cos (c+d x)}{4 a d}+\frac {i \cos (3 (c+d x))}{12 a d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.49, size = 41, normalized size = 0.79 \[ \frac {{\left (-3 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 6 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i\right )} e^{\left (-3 i \, d x - 3 i \, c\right )}}{12 \, a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.80, size = 67, normalized size = 1.29 \[ \frac {\frac {3}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + i\right )}} + \frac {9 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 12 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 7}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}^{3}}}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.16, size = 75, normalized size = 1.44 \[ \frac {\frac {2}{4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+4 i}-\frac {2}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{3}}+\frac {i}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{2}}+\frac {3}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )}}{a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.77, size = 78, normalized size = 1.50 \[ \frac {\left (-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,3{}\mathrm {i}+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1{}\mathrm {i}\right )\,2{}\mathrm {i}}{3\,a\,d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1{}\mathrm {i}\right )\,{\left (1+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}\right )}^3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.48, size = 129, normalized size = 2.48 \[ \begin {cases} - \frac {\left (24 i a^{2} d^{2} e^{5 i c} e^{i d x} - 48 i a^{2} d^{2} e^{3 i c} e^{- i d x} - 8 i a^{2} d^{2} e^{i c} e^{- 3 i d x}\right ) e^{- 4 i c}}{96 a^{3} d^{3}} & \text {for}\: 96 a^{3} d^{3} e^{4 i c} \neq 0 \\\frac {x \left (e^{4 i c} + 2 e^{2 i c} + 1\right ) e^{- 3 i c}}{4 a} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________